window['___jsl'] = {
    'u': 'http:\/\/code-opensocial.googleusercontent.com\/gadgets\/js\/rpc.js?c=1&container=code',
    'f': ['rpc']
};
var gadgets = window.gadgets || {},
    shindig = window.shindig || {},
    osapi = window.osapi || {};;
if (!gadgets.config) {
    gadgets.config = function () {
        var ___jsl;
        var components = {};
        var configuration;

        function foldConfig(origConfig, updConfig) {
            for (var key in updConfig) {
                if (!updConfig.hasOwnProperty(key)) {
                    continue
                }
                if (typeof origConfig[key] === "object" && typeof updConfig[key] === "object") {
                    foldConfig(origConfig[key], updConfig[key])
                } else {
                    origConfig[key] = updConfig[key]
                }
            }
        }
        function getLoadingScript() {
            var scripts = document.scripts || document.getElementsByTagName("script");
            if (!scripts || scripts.length == 0) {
                return null
            }
            var scriptTag;
            if (___jsl.u) {
                for (var i = 0; !scriptTag && i < scripts.length; ++i) {
                    var candidate = scripts[i];
                    if (candidate.src && candidate.src.indexOf(___jsl.u) == 0) {
                        scriptTag = candidate
                    }
                }
            }
            if (!scriptTag) {
                scriptTag = scripts[scripts.length - 1]
            }
            if (!scriptTag.src) {
                return null
            }
            return scriptTag
        }
        function getInnerText(scriptNode) {
            var scriptText = "";
            if (scriptNode.nodeType == 3 || scriptNode.nodeType == 4) {
                scriptText = scriptNode.nodeValue
            } else {
                if (scriptNode.innerText) {
                    scriptText = scriptNode.innerText
                } else {
                    if (scriptNode.firstChild) {
                        var content = [];
                        for (var child = scriptNode.firstChild;
                        child;
                        child = child.nextSibling) {
                            content.push(getInnerText(child))
                        }
                        scriptText = content.join("")
                    }
                }
            }
            return scriptText
        }
        function parseConfig(configText) {
            var config;
            try {
                eval("config=(" + configText + "\n)")
            } catch (e) {}
            if (typeof config === "object") {
                return config
            }
            try {
                eval("config=({" + configText + "\n})")
            } catch (e) {}
            return typeof config === "object" ? config : {}
        }
        function augmentConfig(baseConfig) {
            var loadScript = getLoadingScript();
            if (!loadScript) {
                return
            }
            var scriptText = getInnerText(loadScript);
            var configAugment = parseConfig(scriptText);
            if (___jsl.f && ___jsl.f.length == 1) {
                var feature = ___jsl.f[0];
                if (!configAugment[feature]) {
                    var newConfig = {};
                    newConfig[___jsl.f[0]] = configAugment;
                    configAugment = newConfig
                }
            }
            foldConfig(baseConfig, configAugment)
        }
        return {
            register: function (component, opt_validators, opt_callback) {
                var registered = components[component];
                if (!registered) {
                    registered = [];
                    components[component] = registered
                }
                registered.push({
                    validators: opt_validators || {},
                    callback: opt_callback
                })
            },
            get: function (opt_component) {
                if (opt_component) {
                    return configuration[opt_component] || {}
                }
                return configuration
            },
            init: function (config, opt_noValidation) {
                ___jsl = window.___jsl || {};
                if (configuration) {
                    foldConfig(configuration, config)
                } else {
                    configuration = config
                }
                augmentConfig(configuration);
                var inlineOverride = window.___config || {};
                foldConfig(configuration, inlineOverride);
                for (var name in components) {
                    if (components.hasOwnProperty(name)) {
                        var componentList = components[name],
                            conf = configuration[name];
                        for (var i = 0, j = componentList.length;
                        i < j; ++i) {
                            var component = componentList[i];
                            if (conf && !opt_noValidation) {
                                var validators = component.validators;
                                for (var v in validators) {
                                    if (validators.hasOwnProperty(v)) {
                                        if (!validators[v](conf[v])) {
                                            throw new Error('Invalid config value "' + conf[v] + '" for parameter "' + v + '" in component "' + name + '"')
                                        }
                                    }
                                }
                            }
                            if (component.callback) {
                                component.callback(configuration)
                            }
                        }
                    }
                }
            },
            update: function (updateConfig, opt_replace) {
                configuration = opt_replace ? {} : configuration || {};
                foldConfig(configuration, updateConfig)
            }
        }
    }()
};;
gadgets.config.isGadget = false;
gadgets.config.isContainer = true;;
(function () {
    gadgets.config.EnumValidator = function (d) {
        var c = [];
        if (arguments.length > 1) {
            for (var b = 0, a;
            (a = arguments[b]); ++b) {
                c.push(a)
            }
        } else {
            c = d
        }
        return function (f) {
            for (var e = 0, g;
            (g = c[e]); ++e) {
                if (f === c[e]) {
                    return true
                }
            }
            return false
        }
    };
    gadgets.config.RegExValidator = function (a) {
        return function (b) {
            return a.test(b)
        }
    };
    gadgets.config.ExistsValidator = function (a) {
        return typeof a !== "undefined"
    };
    gadgets.config.NonEmptyStringValidator = function (a) {
        return typeof a === "string" && a.length > 0
    };
    gadgets.config.BooleanValidator = function (a) {
        return typeof a === "boolean"
    };
    gadgets.config.LikeValidator = function (a) {
        return function (c) {
            for (var d in a) {
                if (a.hasOwnProperty(d)) {
                    var b = a[d];
                    if (!b(c[d])) {
                        return false
                    }
                }
            }
            return true
        }
    }
})();;
gadgets.util = function () {
    var a = null;

    function b(e) {
        var f;
        var c = e.indexOf("?");
        var d = e.indexOf("#");
        if (d === -1) {
            f = e.substr(c + 1)
        } else {
            f = [e.substr(c + 1, d - c - 1), "&", e.substr(d + 1)].join("")
        }
        return f.split("&")
    }
    return {
        getUrlParameters: function (p) {
            var d = typeof p === "undefined";
            if (a !== null && d) {
                return a
            }
            var l = {};
            var f = b(p || document.location.href);
            var n = window.decodeURIComponent ? decodeURIComponent : unescape;
            for (var h = 0, g = f.length;
            h < g; ++h) {
                var m = f[h].indexOf("=");
                if (m === -1) {
                    continue
                }
                var c = f[h].substring(0, m);
                var o = f[h].substring(m + 1);
                o = o.replace(/\+/g, " ");
                try {
                    l[c] = n(o)
                } catch (k) {}
            }
            if (d) {
                a = l
            }
            return l
        }
    }
}();
gadgets.util.getUrlParameters();;
gadgets.log = (function () {
    var e = 1;
    var a = 2;
    var f = 3;
    var c = 4;
    var d = function (i) {
            b(e, i)
        };
    gadgets.warn = function (i) {
        b(a, i)
    };
    gadgets.error = function (i) {
        b(f, i)
    };
    gadgets.setLogLevel = function (i) {
        h = i
    };

    function b(j, i) {
        if (j < h || !g) {
            return
        }
        if (j === a && g.warn) {
            g.warn(i)
        } else {
            if (j === f && g.error) {
                g.error(i)
            } else {
                if (g.log) {
                    g.log(i)
                }
            }
        }
    }
    d.INFO = e;
    d.WARNING = a;
    d.NONE = c;
    var h = e;
    var g = window.console ? window.console : window.opera ? window.opera.postError : undefined;
    return d
})();;
var tamings___ = tamings___ || [];
tamings___.push(function (a) {
    ___.grantRead(gadgets.log, "INFO");
    ___.grantRead(gadgets.log, "WARNING");
    ___.grantRead(gadgets.log, "ERROR");
    ___.grantRead(gadgets.log, "NONE");
    caja___.whitelistFuncs([
        [gadgets, "log"],
        [gadgets, "warn"],
        [gadgets, "error"],
        [gadgets, "setLogLevel"]
    ])
});;
if (window.JSON && window.JSON.parse && window.JSON.stringify) {
    gadgets.json = (function () {
        var a = /___$/;
        return {
            parse: function (c) {
                try {
                    return window.JSON.parse(c)
                } catch (b) {
                    return false
                }
            },
            stringify: function (c) {
                try {
                    return window.JSON.stringify(c, function (e, d) {
                        return !a.test(e) ? d : null
                    })
                } catch (b) {
                    return null
                }
            }
        }
    })()
};;
if (!(window.JSON && window.JSON.parse && window.JSON.stringify)) {
    gadgets.json = function () {
        function f(n) {
            return n < 10 ? "0" + n : n
        }
        Date.prototype.toJSON = function () {
            return [this.getUTCFullYear(), "-", f(this.getUTCMonth() + 1), "-", f(this.getUTCDate()), "T", f(this.getUTCHours()), ":", f(this.getUTCMinutes()), ":", f(this.getUTCSeconds()), "Z"].join("")
        };
        var m = {
            "\b": "\\b",
            "\t": "\\t",
            "\n": "\\n",
            "\f": "\\f",
            "\r": "\\r",
            '"': '\\"',
            "\\": "\\\\"
        };

        function stringify(value) {
            var a, i, k, l, r = /["\\\x00-\x1f\x7f-\x9f]/g,
                v;
            switch (typeof value) {
            case "string":
                return r.test(value) ? '"' + value.replace(r, function (a) {
                    var c = m[a];
                    if (c) {
                        return c
                    }
                    c = a.charCodeAt();
                    return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16)
                }) + '"' : '"' + value + '"';
            case "number":
                return isFinite(value) ? String(value) : "null";
            case "boolean":
            case "null":
                return String(value);
            case "object":
                if (!value) {
                    return "null"
                }
                a = [];
                if (typeof value.length === "number" && !value.propertyIsEnumerable("length")) {
                    l = value.length;
                    for (i = 0;
                    i < l;
                    i += 1) {
                        a.push(stringify(value[i]) || "null")
                    }
                    return "[" + a.join(",") + "]"
                }
                for (k in value) {
                    if (k.match("___$")) {
                        continue
                    }
                    if (value.hasOwnProperty(k)) {
                        if (typeof k === "string") {
                            v = stringify(value[k]);
                            if (v) {
                                a.push(stringify(k) + ":" + v)
                            }
                        }
                    }
                }
                return "{" + a.join(",") + "}"
            }
            return ""
        }
        return {
            stringify: stringify,
            parse: function (text) {
                if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
                    return eval("(" + text + ")")
                }
                return false
            }
        }
    }()
};;
gadgets.json.flatten = function (c) {
    var d = {};
    if (c === null || c === undefined) {
        return d
    }
    for (var a in c) {
        if (c.hasOwnProperty(a)) {
            var b = c[a];
            if (null === b || undefined === b) {
                continue
            }
            d[a] = (typeof b === "string") ? b : gadgets.json.stringify(b)
        }
    }
    return d
};;
var tamings___ = tamings___ || [];
tamings___.push(function (a) {
    ___.tamesTo(gadgets.json.stringify, safeJSON.stringify);
    ___.tamesTo(gadgets.json.parse, safeJSON.parse)
});;
var __getUrlParameters = gadgets.util.getUrlParameters;
gadgets.util = function () {
    var d = {};
    var c = {};
    var e = [];
    var a = {
        0: false,
        10: true,
        13: true,
        34: true,
        39: true,
        60: true,
        62: true,
        92: true,
        8232: true,
        8233: true
    };

    function b(g, h) {
        return String.fromCharCode(h)
    }
    function f(g) {
        d = g["core.util"] || {}
    }
    if (gadgets.config) {
        gadgets.config.register("core.util", null, f)
    }
    return {
        getUrlParameters: __getUrlParameters,
        makeClosure: function (l, n, m) {
            var k = [];
            for (var h = 2, g = arguments.length;
            h < g; ++h) {
                k.push(arguments[h])
            }
            return function () {
                var o = k.slice();
                for (var q = 0, p = arguments.length;
                q < p; ++q) {
                    o.push(arguments[q])
                }
                return n.apply(l, o)
            }
        },
        makeEnum: function (h) {
            var j, g, k = {};
            for (j = 0;
            (g = h[j]); ++j) {
                k[g] = g
            }
            return k
        },
        getFeatureParameters: function (g) {
            return typeof d[g] === "undefined" ? null : d[g]
        },
        hasFeature: function (g) {
            return typeof d[g] !== "undefined"
        },
        getServices: function () {
            return c
        },
        registerOnLoadHandler: function (g) {
            e.push(g)
        },
        runOnLoadHandlers: function () {
            for (var h = 0, g = e.length;
            h < g; ++h) {
                e[h]()
            }
        },
        escape: function (g, m) {
            if (!g) {
                return g
            } else {
                if (typeof g === "string") {
                    return gadgets.util.escapeString(g)
                } else {
                    if (typeof g === "array") {
                        for (var l = 0, h = g.length;
                        l < h; ++l) {
                            g[l] = gadgets.util.escape(g[l])
                        }
                    } else {
                        if (typeof g === "object" && m) {
                            var k = {};
                            for (var n in g) {
                                if (g.hasOwnProperty(n)) {
                                    k[gadgets.util.escapeString(n)] = gadgets.util.escape(g[n], true)
                                }
                            }
                            return k
                        }
                    }
                }
            }
            return g
        },
        escapeString: function (m) {
            if (!m) {
                return m
            }
            var h = [],
                l, n;
            for (var k = 0, g = m.length;
            k < g; ++k) {
                l = m.charCodeAt(k);
                n = a[l];
                if (n === true) {
                    h.push("&#", l, ";")
                } else {
                    if (n !== false) {
                        h.push(m.charAt(k))
                    }
                }
            }
            return h.join("")
        },
        unescapeString: function (g) {
            if (!g) {
                return g
            }
            return g.replace(/&#([0-9]+);/g, b)
        },
        attachBrowserEvent: function (i, h, j, g) {
            if (typeof i.addEventListener != "undefined") {
                i.addEventListener(h, j, g)
            } else {
                if (typeof i.attachEvent != "undefined") {
                    i.attachEvent("on" + h, j)
                } else {
                    gadgets.warn("cannot attachBrowserEvent: " + h)
                }
            }
        },
        removeBrowserEvent: function (i, h, j, g) {
            if (i.removeEventListener) {
                i.removeEventListener(h, j, g)
            } else {
                if (i.detachEvent) {
                    i.detachEvent("on" + h, j)
                } else {
                    gadgets.warn("cannot removeBrowserEvent: " + h)
                }
            }
        }
    }
}();;
var tamings___ = tamings___ || [];
tamings___.push(function (a) {
    caja___.whitelistFuncs([
        [gadgets.util, "escapeString"],
        [gadgets.util, "getFeatureParameters"],
        [gadgets.util, "getUrlParameters"],
        [gadgets.util, "hasFeature"],
        [gadgets.util, "registerOnLoadHandler"],
        [gadgets.util, "unescapeString"]
    ])
});;
gadgets.rpctx = gadgets.rpctx || {};
if (!gadgets.rpctx.wpm) {
    gadgets.rpctx.wpm = function () {
        var d, c;
        var e = false;

        function b(h, i, g) {
            if (typeof window.addEventListener != "undefined") {
                window.addEventListener(h, i, g)
            } else {
                if (typeof window.attachEvent != "undefined") {
                    window.attachEvent("on" + h, i)
                }
            }
        }
        function a(h, i, g) {
            if (window.removeEventListener) {
                window.removeEventListener(h, i, g)
            } else {
                if (window.detachEvent) {
                    window.detachEvent("on" + h, i)
                }
            }
        }
        function f(i) {
            var j = gadgets.json.parse(i.data);
            if (e) {
                if (!j || !j.f) {
                    return
                }
                var h = gadgets.rpc.getRelayUrl(j.f) || gadgets.util.getUrlParameters()["parent"];
                var g = gadgets.rpc.getOrigin(h);
                if (typeof i.origin !== "undefined" ? i.origin !== g : i.domain !== /^.+:\/\/([^:]+).*/.exec(g)[1]) {
                    return
                }
            }
            d(j, i.origin)
        }
        return {
            getCode: function () {
                return "wpm"
            },
            isParentVerifiable: function () {
                return true
            },
            init: function (g, h) {
                d = g;
                c = h;
                b("message", f, false);
                c("..", true);
                return true
            },
            setup: function (i, h, g) {
                e = g;
                if (i === "..") {
                    if (e) {
                        gadgets.rpc._createRelayIframe(h)
                    } else {
                        gadgets.rpc.call(i, gadgets.rpc.ACK)
                    }
                }
                return true
            },
            call: function (h, k, j) {
                var g = gadgets.rpc.getTargetOrigin(h);
                var i = gadgets.rpc._getTargetWin(h);
                if (g) {
                    window.setTimeout(function () {
                        i.postMessage(gadgets.json.stringify(j), g)
                    }, 0)
                } else {
                    gadgets.error("No relay set (used as window.postMessage targetOrigin), cannot send cross-domain message")
                }
                return true
            },
            relayOnload: function (h, g) {
                c(h, true)
            }
        }
    }()
};;;
gadgets.rpctx = gadgets.rpctx || {};
if (!gadgets.rpctx.frameElement) {
    gadgets.rpctx.frameElement = function () {
        var e = "__g2c_rpc";
        var b = "__c2g_rpc";
        var d;
        var c;

        function a(g, k, j) {
            try {
                if (k !== "..") {
                    var f = window.frameElement;
                    if (typeof f[e] === "function") {
                        if (typeof f[e][b] !== "function") {
                            f[e][b] = function (l) {
                                d(gadgets.json.parse(l))
                            }
                        }
                        f[e](gadgets.json.stringify(j));
                        return true
                    }
                } else {
                    var i = document.getElementById(g);
                    if (typeof i[e] === "function" && typeof i[e][b] === "function") {
                        i[e][b](gadgets.json.stringify(j));
                        return true
                    }
                }
            } catch (h) {}
            return false
        }
        return {
            getCode: function () {
                return "fe"
            },
            isParentVerifiable: function () {
                return false
            },
            init: function (f, g) {
                d = f;
                c = g;
                return true
            },
            setup: function (j, f) {
                if (j !== "..") {
                    try {
                        var i = document.getElementById(j);
                        i[e] = function (k) {
                            d(gadgets.json.parse(k))
                        }
                    } catch (h) {
                        return false
                    }
                }
                if (j === "..") {
                    c("..", true);
                    var g = function () {
                            window.setTimeout(function () {
                                gadgets.rpc.call(j, gadgets.rpc.ACK)
                            }, 500)
                        };
                    gadgets.util.registerOnLoadHandler(g)
                }
                return true
            },
            call: function (f, h, g) {
                return a(f, h, g)
            }
        }
    }()
};;;
gadgets.rpctx = gadgets.rpctx || {};
if (!gadgets.rpctx.flash) {
    gadgets.rpctx.flash = function () {
        var v = "___xpcswf";
        var g = null;
        var m = false;
        var q = null;
        var n = null;
        var c = {};
        var o = null;
        var i = 100;
        var r = 50;
        var x = [];
        var e = null;
        var A = 0;
        var f = "_scr";
        var j = 100;
        var y = 50;
        var s = 0;
        var h = null;
        var b = {};
        var z = window.location.protocol + "//" + window.location.host;

        function k(B) {
            return B === ".." ? gadgets.rpc.RPC_ID : B
        }
        function a(B) {
            return B === ".." ? "INNER" : "OUTER"
        }
        function u(B) {
            if (m) {
                g = B.rpc["commSwf"] || "/xpc.swf"
            }
        }
        gadgets.config.register("rpc", null, u);

        function d() {
            if (o === null && document.body && g) {
                var D = g + "?cb=" + Math.random() + "&origin=" + z;
                var C = document.createElement("div");
                C.style.height = "1px";
                C.style.width = "1px";
                var B = '<object height="1" width="1" id="' + v + '" type="application/x-shockwave-flash"><param name="allowScriptAccess" value="always"></param><param name="movie" value="' + D + '"></param><embed type="application/x-shockwave-flash" allowScriptAccess="always" src="' + D + '" height="1" width="1"></embed></object>';
                document.body.appendChild(C);
                C.innerHTML = B;
                o = C.firstChild
            }++A;
            if (e !== null && (o !== null || A >= r)) {
                window.clearTimeout(e)
            } else {
                e = window.setTimeout(d, i)
            }
        }
        function l() {
            if (b[".."]) {
                return
            }
            t("..");
            s++;
            if (s >= y && h !== null) {
                window.clearTimeout(h);
                h = null
            } else {
                h = window.setTimeout(l, j)
            }
        }
        function p() {
            if (o !== null) {
                while (x.length > 0) {
                    var C = x.shift();
                    var B = C.targetId;
                    o.setup(C.token, k(B), a(B))
                }
            }
        }
        function w(D, H, F) {
            var C = gadgets.rpc.getTargetOrigin(D);
            var G = gadgets.rpc.getAuthToken(D);
            var B = "sendMessage_" + k(D) + "_" + G + "_" + a(D);
            var E = o[B];
            E.call(o, gadgets.json.stringify(F), C);
            return true
        }
        function t(D) {
            var B = gadgets.rpc.RPC_ID;
            var C = {};
            C[f] = B;
            w(D, B, C)
        }
        return {
            getCode: function () {
                return "flash"
            },
            isParentVerifiable: function () {
                return true
            },
            init: function (B, C) {
                q = B;
                n = C;
                m = true;
                return true
            },
            setup: function (D, C, B) {
                c[D] = !! B;
                x.push({
                    token: C,
                    targetId: D
                });
                if (o === null && e === null) {
                    e = window.setTimeout(d, i)
                }
                p();
                return true
            },
            call: w,
            _receiveMessage: function (D, G, F, E) {
                var B = gadgets.json.parse(D);
                var C = B[f];
                if (C) {
                    n(C, true);
                    b[C] = true;
                    if (C !== "..") {
                        t(C)
                    }
                    return
                }
                window.setTimeout(function () {
                    q(B, G)
                }, 0)
            },
            _ready: function () {
                p();
                if (e !== null) {
                    window.clearTimeout(e)
                }
                e = null
            },
            _setupDone: function () {
                if (!b[".."] && h === null) {
                    h = window.setTimeout(l, j)
                }
            }
        }
    }()
};;;
gadgets.rpctx = gadgets.rpctx || {};
if (!gadgets.rpctx.nix) {
    gadgets.rpctx.nix = function () {
        var c = "GRPC____NIXVBS_wrapper";
        var d = "GRPC____NIXVBS_get_wrapper";
        var f = "GRPC____NIXVBS_handle_message";
        var b = "GRPC____NIXVBS_create_channel";
        var a = 10;
        var j = 500;
        var i = {};
        var h;
        var g = 0;

        function e() {
            var l = i[".."];
            if (l) {
                return
            }
            if (++g > a) {
                gadgets.warn("Nix transport setup failed, falling back...");
                h("..", false);
                return
            }
            if (!l && window.opener && "GetAuthToken" in window.opener) {
                l = window.opener;
                if (l.GetAuthToken() == gadgets.rpc.getAuthToken("..")) {
                    var k = gadgets.rpc.getAuthToken("..");
                    l.CreateChannel(window[d]("..", k), k);
                    i[".."] = l;
                    window.opener = null;
                    h("..", true);
                    return
                }
            }
            window.setTimeout(function () {
                e()
            }, j)
        }
        return {
            getCode: function () {
                return "nix"
            },
            isParentVerifiable: function () {
                return false
            },
            init: function (l, m) {
                h = m;
                if (typeof window[d] !== "unknown") {
                    window[f] = function (o) {
                        window.setTimeout(function () {
                            l(gadgets.json.parse(o))
                        }, 0)
                    };
                    window[b] = function (o, q, p) {
                        if (gadgets.rpc.getAuthToken(o) === p) {
                            i[o] = q;
                            h(o, true)
                        }
                    };
                    var k = "Class " + c + "\n Private m_Intended\nPrivate m_Auth\nPublic Sub SetIntendedName(name)\n If isEmpty(m_Intended) Then\nm_Intended = name\nEnd If\nEnd Sub\nPublic Sub SetAuth(auth)\n If isEmpty(m_Auth) Then\nm_Auth = auth\nEnd If\nEnd Sub\nPublic Sub SendMessage(data)\n " + f + "(data)\nEnd Sub\nPublic Function GetAuthToken()\n GetAuthToken = m_Auth\nEnd Function\nPublic Sub CreateChannel(channel, auth)\n Call " + b + "(m_Intended, channel, auth)\nEnd Sub\nEnd Class\nFunction " + d + "(name, auth)\nDim wrap\nSet wrap = New " + c + "\nwrap.SetIntendedName name\nwrap.SetAuth auth\nSet " + d + " = wrap\nEnd Function";
                    try {
                        window.execScript(k, "vbscript")
                    } catch (n) {
                        return false
                    }
                }
                return true
            },
            setup: function (o, k) {
                if (o === "..") {
                    e();
                    return true
                }
                try {
                    var m = document.getElementById(o);
                    var n = window[d](o, k);
                    m.contentWindow.opener = n
                } catch (l) {
                    return false
                }
                return true
            },
            call: function (k, n, m) {
                try {
                    if (i[k]) {
                        i[k].SendMessage(gadgets.json.stringify(m))
                    }
                } catch (l) {
                    return false
                }
                return true
            }
        }
    }()
};;;
gadgets.rpctx = gadgets.rpctx || {};
if (!gadgets.rpctx.rmr) {
    gadgets.rpctx.rmr = function () {
        var g = 500;
        var e = 10;
        var h = {};
        var b;
        var i;

        function k(p, n, o, m) {
            var q = function () {
                    document.body.appendChild(p);
                    p.src = "about:blank";
                    if (m) {
                        p.onload = function () {
                            l(m)
                        }
                    }
                    p.src = n + "#" + o
                };
            if (document.body) {
                q()
            } else {
                gadgets.util.registerOnLoadHandler(function () {
                    q()
                })
            }
        }
        function c(o) {
            if (typeof h[o] === "object") {
                return
            }
            var p = document.createElement("iframe");
            var m = p.style;
            m.position = "absolute";
            m.top = "0px";
            m.border = "0";
            m.opacity = "0";
            m.width = "10px";
            m.height = "1px";
            p.id = "rmrtransport-" + o;
            p.name = p.id;
            var n = gadgets.rpc.getRelayUrl(o);
            if (!n) {
                n = gadgets.rpc.getOrigin(gadgets.util.getUrlParameters()["parent"]) + "/robots.txt"
            }
            h[o] = {
                frame: p,
                receiveWindow: null,
                relayUri: n,
                searchCounter: 0,
                width: 10,
                waiting: true,
                queue: [],
                sendId: 0,
                recvId: 0
            };
            if (o !== "..") {
                k(p, n, a(o))
            }
            d(o)
        }
        function d(o) {
            var q = null;
            h[o].searchCounter++;
            try {
                var n = gadgets.rpc._getTargetWin(o);
                if (o === "..") {
                    q = n.frames["rmrtransport-" + gadgets.rpc.RPC_ID]
                } else {
                    q = n.frames["rmrtransport-.."]
                }
            } catch (p) {}
            var m = false;
            if (q) {
                m = f(o, q)
            }
            if (!m) {
                if (h[o].searchCounter > e) {
                    return
                }
                window.setTimeout(function () {
                    d(o)
                }, g)
            }
        }
        function j(n, p, t, s) {
            var o = null;
            if (t !== "..") {
                o = h[".."]
            } else {
                o = h[n]
            }
            if (o) {
                if (p !== gadgets.rpc.ACK) {
                    o.queue.push(s)
                }
                if (o.waiting || (o.queue.length === 0 && !(p === gadgets.rpc.ACK && s && s.ackAlone === true))) {
                    return true
                }
                if (o.queue.length > 0) {
                    o.waiting = true
                }
                var m = o.relayUri + "#" + a(n);
                try {
                    o.frame.contentWindow.location = m;
                    var q = o.width == 10 ? 20 : 10;
                    o.frame.style.width = q + "px";
                    o.width = q
                } catch (r) {
                    return false
                }
            }
            return true
        }
        function a(n) {
            var o = h[n];
            var m = {
                id: o.sendId
            };
            if (o) {
                m.d = Array.prototype.slice.call(o.queue, 0);
                m.d.push({
                    s: gadgets.rpc.ACK,
                    id: o.recvId
                })
            }
            return gadgets.json.stringify(m)
        }
        function l(x) {
            var u = h[x];
            var q = u.receiveWindow.location.hash.substring(1);
            var y = gadgets.json.parse(decodeURIComponent(q)) || {};
            var n = y.d || [];
            var o = false;
            var t = false;
            var v = 0;
            var m = (u.recvId - y.id);
            for (var p = 0;
            p < n.length; ++p) {
                var s = n[p];
                if (s.s === gadgets.rpc.ACK) {
                    i(x, true);
                    if (u.waiting) {
                        t = true
                    }
                    u.waiting = false;
                    var r = Math.max(0, s.id - u.sendId);
                    u.queue.splice(0, r);
                    u.sendId = Math.max(u.sendId, s.id || 0);
                    continue
                }
                o = true;
                if (++v <= m) {
                    continue
                }++u.recvId;
                b(s)
            }
            if (o || (t && u.queue.length > 0)) {
                var w = (x === "..") ? gadgets.rpc.RPC_ID : "..";
                j(x, gadgets.rpc.ACK, w, {
                    ackAlone: o
                })
            }
        }
        function f(p, s) {
            var o = h[p];
            try {
                var n = false;
                n = "document" in s;
                if (!n) {
                    return false
                }
                n = typeof s.document == "object";
                if (!n) {
                    return false
                }
                var r = s.location.href;
                if (r === "about:blank") {
                    return false
                }
            } catch (m) {
                return false
            }
            o.receiveWindow = s;

            function q() {
                l(p)
            }
            if (typeof s.attachEvent === "undefined") {
                s.onresize = q
            } else {
                s.attachEvent("onresize", q)
            }
            if (p === "..") {
                k(o.frame, o.relayUri, a(p), p)
            } else {
                l(p)
            }
            return true
        }
        return {
            getCode: function () {
                return "rmr"
            },
            isParentVerifiable: function () {
                return true
            },
            init: function (m, n) {
                b = m;
                i = n;
                return true
            },
            setup: function (o, m) {
                try {
                    c(o)
                } catch (n) {
                    gadgets.warn("Caught exception setting up RMR: " + n);
                    return false
                }
                return true
            },
            call: function (m, o, n) {
                return j(m, n.s, o, n)
            }
        }
    }()
};;;
gadgets.rpctx = gadgets.rpctx || {};
if (!gadgets.rpctx.ifpc) {
    gadgets.rpctx.ifpc = function () {
        var e = [];
        var d = 0;
        var c;

        function b(h) {
            var f = [];
            for (var k = 0, g = h.length;
            k < g; ++k) {
                f.push(encodeURIComponent(gadgets.json.stringify(h[k])))
            }
            return f.join("&")
        }
        function a(j) {
            var g;
            for (var f = e.length - 1;
            f >= 0; --f) {
                var k = e[f];
                try {
                    if (k && (k.recyclable || k.readyState === "complete")) {
                        k.parentNode.removeChild(k);
                        if (window.ActiveXObject) {
                            e[f] = k = null;
                            e.splice(f, 1)
                        } else {
                            k.recyclable = false;
                            g = k;
                            break
                        }
                    }
                } catch (h) {}
            }
            if (!g) {
                g = document.createElement("iframe");
                g.style.border = g.style.width = g.style.height = "0px";
                g.style.visibility = "hidden";
                g.style.position = "absolute";
                g.onload = function () {
                    this.recyclable = true
                };
                e.push(g)
            }
            g.src = j;
            window.setTimeout(function () {
                document.body.appendChild(g)
            }, 0)
        }
        return {
            getCode: function () {
                return "ifpc"
            },
            isParentVerifiable: function () {
                return true
            },
            init: function (f, g) {
                c = g;
                c("..", true);
                return true
            },
            setup: function (g, f) {
                c(g, true);
                return true
            },
            call: function (f, k, i) {
                var j = gadgets.rpc.getRelayUrl(f);
                ++d;
                if (!j) {
                    gadgets.warn("No relay file assigned for IFPC");
                    return false
                }
                var h = null;
                if (i.l) {
                    var g = i.a;
                    h = [j, "#", b([k, d, 1, 0, b([k, i.s, "", "", k].concat(g))])].join("")
                } else {
                    h = [j, "#", f, "&", k, "@", d, "&1&0&", encodeURIComponent(gadgets.json.stringify(i))].join("")
                }
                a(h);
                return true
            }
        }
    }()
};;
if (!gadgets.rpc) {
    gadgets.rpc = function () {
        var I = "__cb";
        var P = "";
        var Q = "__ack";
        var f = 500;
        var C = 10;
        var c = "|";
        var r = "callback";
        var g = "origin";
        var p = "referer";
        var o = {};
        var T = {};
        var z = {};
        var x = {};
        var v = 0;
        var k = {};
        var l = {};
        var N = {};
        var e = {};
        var m = {};
        var A = {};
        var w = (window.top !== window.self);
        var s = window.name;
        var F = function () {};
        var M = 0;
        var W = 1;
        var a = 2;
        var t = window.console;
        var S = t && t.log ? t.log : function () {};
        var O = (function () {
            function aa(ab) {
                return function () {
                    S(ab + ": call ignored")
                }
            }
            return {
                getCode: function () {
                    return "noop"
                },
                isParentVerifiable: function () {
                    return true
                },
                init: aa("init"),
                setup: aa("setup"),
                call: aa("call")
            }
        })();
        if (gadgets.util) {
            e = gadgets.util.getUrlParameters()
        }
        function G() {
            if (e.flash == "1") {
                return gadgets.rpctx.flash
            }
            return typeof window.postMessage === "function" ? gadgets.rpctx.wpm : typeof window.postMessage === "object" ? gadgets.rpctx.wpm : window.ActiveXObject ? (gadgets.rpctx.flash ? gadgets.rpctx.flash : gadgets.rpctx.nix) : navigator.userAgent.indexOf("WebKit") > 0 ? gadgets.rpctx.rmr : navigator.product === "Gecko" ? gadgets.rpctx.frameElement : gadgets.rpctx.ifpc
        }
        function j(af, ad) {
            if (m[af]) {
                return
            }
            var ab = D;
            if (!ad) {
                ab = O
            }
            m[af] = ab;
            var aa = A[af] || [];
            for (var ac = 0;
            ac < aa.length; ++ac) {
                var ae = aa[ac];
                ae.t = B(af);
                ab.call(af, ae.f, ae)
            }
            A[af] = []
        }
        var E = false,
            R = false;

        function K() {
            if (R) {
                return
            }
            function aa() {
                E = true
            }
            gadgets.util.attachBrowserEvent(window, "unload", aa, false);
            R = true
        }
        function i(aa, ae, ab, ad, ac) {
            if (!x[ae] || x[ae] !== ab) {
                gadgets.error("Invalid auth token. " + x[ae] + " vs " + ab);
                F(ae, a)
            }
            ac.onunload = function () {
                if (l[ae] && !E) {
                    F(ae, W);
                    gadgets.rpc.removeReceiver(ae)
                }
            };
            K();
            ad = gadgets.json.parse(decodeURIComponent(ad));
            D.relayOnload(ae, ad)
        }
        function X(ae, ab) {
            if (ae && typeof ae.s === "string" && typeof ae.f === "string" && ae.a instanceof Array) {
                if (x[ae.f]) {
                    if (x[ae.f] !== ae.t) {
                        gadgets.error("Invalid auth token. " + x[ae.f] + " vs " + ae.t);
                        F(ae.f, a)
                    }
                }
                if (ae.s === Q) {
                    window.setTimeout(function () {
                        j(ae.f, true)
                    }, 0);
                    return
                }
                if (ae.c) {
                    ae[r] = function (af) {
                        gadgets.rpc.call(ae.f, I, null, ae.c, af)
                    }
                }
                if (ab) {
                    var ac = q(ab);
                    ae[g] = ab;
                    var ad = document.referrer;
                    if (!ad || q(ad) != ac) {
                        ad = ab
                    }
                    ae[p] = ad
                }
                var aa = (o[ae.s] || o[P]).apply(ae, ae.a);
                if (ae.c && typeof aa !== "undefined") {
                    gadgets.rpc.call(ae.f, I, null, ae.c, aa)
                }
            }
        }
        function q(ac) {
            if (!ac) {
                return ""
            }
            ac = ac.toLowerCase();
            if (ac.indexOf("//") == 0) {
                ac = window.location.protocol + ac
            }
            if (ac.indexOf("://") == -1) {
                ac = window.location.protocol + "//" + ac
            }
            var ad = ac.substring(ac.indexOf("://") + 3);
            var aa = ad.indexOf("/");
            if (aa != -1) {
                ad = ad.substring(0, aa)
            }
            var af = ac.substring(0, ac.indexOf("://"));
            var ae = "";
            var ag = ad.indexOf(":");
            if (ag != -1) {
                var ab = ad.substring(ag + 1);
                ad = ad.substring(0, ag);
                if ((af === "http" && ab !== "80") || (af === "https" && ab !== "443")) {
                    ae = ":" + ab
                }
            }
            return af + "://" + ad + ae
        }
        function y(ab, aa) {
            return "/" + ab + (aa ? c + aa : "")
        }
        function u(ad) {
            if (ad.charAt(0) == "/") {
                var ab = ad.indexOf(c);
                var ac = ab > 0 ? ad.substring(1, ab) : ad.substring(1);
                var aa = ab > 0 ? ad.substring(ab + 1) : null;
                return {
                    id: ac,
                    origin: aa
                }
            } else {
                return null
            }
        }
        function Z(ac) {
            if (typeof ac === "undefined" || ac === "..") {
                return window.parent
            }
            var ab = u(ac);
            if (ab) {
                return window.top.frames[ab.id]
            }
            ac = String(ac);
            var aa = window.frames[ac];
            if (aa) {
                return aa
            }
            aa = document.getElementById(ac);
            if (aa && aa.contentWindow) {
                return aa.contentWindow
            }
            return null
        }
        function H(ad) {
            var ac = null;
            var aa = L(ad);
            if (aa) {
                ac = aa
            } else {
                var ab = u(ad);
                if (ab) {
                    ac = ab.origin
                } else {
                    if (ad == "..") {
                        ac = e.parent
                    } else {
                        ac = document.getElementById(ad).src
                    }
                }
            }
            return q(ac)
        }
        var D = G();
        o[P] = function () {
            S("Unknown RPC service: " + this.s)
        };
        o[I] = function (ab, aa) {
            var ac = k[ab];
            if (ac) {
                delete k[ab];
                ac.call(this, aa)
            }
        };

        function V(ad, ab, aa) {
            if (l[ad] === true) {
                return
            }
            if (typeof l[ad] === "undefined") {
                l[ad] = 0
            }
            var ac = Z(ad);
            if (ad === ".." || ac != null) {
                if (D.setup(ad, ab, aa) === true) {
                    l[ad] = true;
                    return
                }
            }
            if (l[ad] !== true && l[ad]++ < C) {
                window.setTimeout(function () {
                    V(ad, ab, aa)
                }, f)
            } else {
                m[ad] = O;
                l[ad] = true
            }
        }
        function J(ab, ae) {
            if (typeof N[ab] === "undefined") {
                N[ab] = false;
                var ad = L(ab);
                if (q(ad) !== q(window.location.href)) {
                    return false
                }
                var ac = Z(ab);
                try {
                    var af = ac.gadgets;
                    N[ab] = af.rpc.receiveSameDomain
                } catch (aa) {
                    gadgets.error("Same domain call failed: parent= incorrectly set.")
                }
            }
            if (typeof N[ab] === "function") {
                N[ab](ae);
                return true
            }
            return false
        }
        function L(ab) {
            var aa = T[ab];
            if (aa && aa.substring(0, 1) === "/") {
                if (aa.substring(1, 2) === "/") {
                    aa = document.location.protocol + aa
                } else {
                    aa = document.location.protocol + "//" + document.location.host + aa
                }
            }
            return aa
        }
        function Y(ab, aa, ac) {
            if (!/http(s)?:\/\/.+/.test(aa)) {
                if (aa.indexOf("//") == 0) {
                    aa = window.location.protocol + aa
                } else {
                    if (aa.charAt(0) == "/") {
                        aa = window.location.protocol + "//" + window.location.host + aa
                    } else {
                        if (aa.indexOf("://") == -1) {
                            aa = window.location.protocol + "//" + aa
                        }
                    }
                }
            }
            T[ab] = aa;
            z[ab] = !! ac
        }
        function B(aa) {
            return x[aa]
        }
        function d(aa, ac, ab) {
            ac = ac || "";
            x[aa] = String(ac);
            V(aa, ac, ab)
        }
        function b(aa, ab) {
            function ac(ag) {
                var af = ag ? ag.rpc : {};
                var ae = af.useLegacyProtocol;
                if (typeof ae === "string") {
                    ae = ae === "true"
                }
                var ad = af.parentRelayUrl || "";
                ad = q(e.parent) + ad;
                var ah = !! ae;
                Y("..", ad, ah);
                if (ah) {
                    D = gadgets.rpctx.ifpc;
                    D.init(X, j)
                }
                d("..", aa, ab || e.forcesecure)
            }
            gadgets.config.register("rpc", null, ac)
        }
        function U(ad, aa, ae) {
            var ab = ae || e.forcesecure || false;
            var ac = aa || e.parent;
            if (ac) {
                Y("..", ac);
                d("..", ad, ab)
            }
        }
        function n(ac, ae, aa, ad) {
            if (ac.charAt(0) != "/") {
                if (!gadgets.util) {
                    return
                }
                var ai = document.getElementById(ac);
                if (!ai) {
                    throw new Error("Cannot set up gadgets.rpc receiver with ID: " + ac + ", element not found.")
                }
            }
            var ag = ae || ai.src;
            Y(ac, ag);
            var ah = gadgets.util.getUrlParameters(ag);
            var ab = aa || ah.rpctoken;
            var af = ad || ah.forcesecure;
            d(ac, ab, af)
        }
        function h(aa, ac, ae, ad) {
            if (aa === "..") {
                var ab = ae || e.rpctoken || e.ifpctok || "";
                if (window.__isgadget === true) {
                    b(ab, ad)
                } else {
                    U(ab, ac, ad)
                }
            } else {
                n(aa, ac, ae, ad)
            }
        }
        return {
            config: function (aa) {
                if (typeof aa.securityCallback === "function") {
                    F = aa.securityCallback
                }
            },
            register: function (ab, aa) {
                if (ab === I || ab === Q) {
                    throw new Error("Cannot overwrite callback/ack service")
                }
                if (ab === P) {
                    throw new Error("Cannot overwrite default service: use registerDefault")
                }
                o[ab] = aa
            },
            unregister: function (aa) {
                if (aa === I || aa === Q) {
                    throw new Error("Cannot delete callback/ack service")
                }
                if (aa === P) {
                    throw new Error("Cannot delete default service: use unregisterDefault")
                }
                delete o[aa]
            },
            registerDefault: function (aa) {
                o[P] = aa
            },
            unregisterDefault: function () {
                delete o[P]
            },
            forceParentVerifiable: function () {
                if (!D.isParentVerifiable()) {
                    D = gadgets.rpctx.ifpc
                }
            },
            call: function (aa, ab, ag, ae) {
                aa = aa || "..";
                var af = "..";
                if (aa === "..") {
                    af = s
                } else {
                    if (aa.charAt(0) == "/") {
                        af = y(s, gadgets.rpc.getOrigin(window.location.href))
                    }
                }++v;
                if (ag) {
                    k[v] = ag
                }
                var ad = {
                    s: ab,
                    f: af,
                    c: ag ? v : 0,
                    a: Array.prototype.slice.call(arguments, 3),
                    t: x[aa],
                    l: z[aa]
                };
                if (aa !== ".." && u(aa) == null && !document.getElementById(aa)) {
                    return
                }
                if (J(aa, ad)) {
                    return
                }
                var ac = m[aa];
                if (!ac && u(aa) !== null) {
                    ac = D
                }
                if (!ac) {
                    if (!A[aa]) {
                        A[aa] = [ad]
                    } else {
                        A[aa].push(ad)
                    }
                    return
                }
                if (z[aa]) {
                    ac = gadgets.rpctx.ifpc
                }
                if (ac.call(aa, af, ad) === false) {
                    m[aa] = O;
                    D.call(aa, af, ad)
                }
            },
            getRelayUrl: L,
            setRelayUrl: Y,
            setAuthToken: d,
            setupReceiver: h,
            getAuthToken: B,
            removeReceiver: function (aa) {
                delete T[aa];
                delete z[aa];
                delete x[aa];
                delete l[aa];
                delete N[aa];
                delete m[aa]
            },
            getRelayChannel: function () {
                return D.getCode()
            },
            receive: function (ab, aa) {
                if (ab.length > 4) {
                    X(gadgets.json.parse(decodeURIComponent(ab[ab.length - 1])))
                } else {
                    i.apply(null, ab.concat(aa))
                }
            },
            receiveSameDomain: function (aa) {
                aa.a = Array.prototype.slice.call(aa.a);
                window.setTimeout(function () {
                    X(aa)
                }, 0)
            },
            getOrigin: q,
            getTargetOrigin: H,
            init: function () {
                if (D.init(X, j) === false) {
                    D = O
                }
                if (w) {
                    h("..")
                }
            },
            _getTargetWin: Z,
            _parseSiblingId: u,
            _createRelayIframe: function (aa, ac) {
                var af = L("..");
                if (!af) {
                    return null
                }
                var ae = af + "#..&" + s + "&" + aa + "&" + encodeURIComponent(gadgets.json.stringify(ac));
                var ab = document.createElement("iframe");
                ab.style.border = ab.style.width = ab.style.height = "0px";
                ab.style.visibility = "hidden";
                ab.style.position = "absolute";

                function ad() {
                    document.body.appendChild(ab);
                    ab.src = 'javascript:"<html></html>"';
                    ab.src = ae
                }
                if (document.body) {
                    ad()
                } else {
                    gadgets.util.registerOnLoadHandler(function () {
                        ad()
                    })
                }
                return ab
            },
            ACK: Q,
            RPC_ID: s || "..",
            SEC_ERROR_LOAD_TIMEOUT: M,
            SEC_ERROR_FRAME_PHISH: W,
            SEC_ERROR_FORGED_MSG: a
        }
    }();
    gadgets.rpc.init()
};;
gadgets.config.init({
    "rpc": {
        "commSwf": "//xpc.googleusercontent.com/gadgets",
        "parentRelayUrl": "/rpc_relay.html"
    }
});